﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using EzFrameWork;
using UnityEngine.SceneManagement;
public class TestAssetPool : MonoBehaviour {
	

	void Start () {
        //EzObjPoolMgr.Instance.CreateNewPoolRoot("Cube");
        //EzObjPoolMgr.Instance.CreateNewPoolRoot("Cube1");
        ToolUnity.ForeachFile(Application.dataPath,"cs",e=> { });
	}

	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.W))
        {
			Vector3 ram = new Vector3(Random.Range(-10,10), Random.Range(-10, 10), Random.Range(-10, 10));
			EzObjPoolMgr.Instance.GetGameObjectFromPool("Cube").transform.position = ram;
		}
		if (Input.GetKeyDown(KeyCode.E))
		{
			Vector3 ram = new Vector3(Random.Range(-10, 10), Random.Range(-10, 10), Random.Range(-10, 10));
			EzObjPoolMgr.Instance.GetGameObjectFromPool("Cube1").transform.position = ram;
		}
		if (Input.GetKeyDown(KeyCode.A))
        {
			SceneManager.LoadScene(1);
        }
		if (Input.GetKeyDown(KeyCode.B))
		{
			SceneManager.LoadScene(0);
		}
	}
}
